<template>
  <div class="list">
       <van-nav-bar title="图文详情" left-text="返回" left-arrow
      @click-left="$router.back()"
      >
  <template #right>
    <van-icon name="search" size="18" />
  </template>
</van-nav-bar>
<div class="tou" v-for="item in tuList"
:key="item.id"
>
  <h2>{{item.title}}</h2>
  <p class="aaw">{{item.add_time |filters}} {{item.click}}次浏览
<span>分类:{{item.category}}</span>

  </p>
  <div class="zhong">
    <van-image 
  v-for="item2 in list"
  :key="item2.id"
  :src="item2.src"
  class="lista"
  
  
  >
  
  </van-image>
  <p
  v-html="item.content"
  ></p>
  </div>
</div>
  </div>
</template>

<script>
import {getimageInfoData,getthumimagesData} from '../../apis/api'
export default {
data () {
  return {
    tuList:[],
    list:[]
  }
},
async created () {
  const res = await getimageInfoData(this.$route.params.id)
  console.log(res);
  this.tuList=res.message
  const res2 = await getthumimagesData(this.$route.params.id)
  console.log(res2);
  this.list=res2.message
}
}
</script>

<style lang="less" scoped>
h2{
  font-size: 20px;
  color: aqua;
}
.aaw{
  font-size: 5px;
  position: relative;
  left: -40px;
  color: #cfcbcb;
}
.lista{
  margin-top: 15px;
  margin-left: 5px;
  width: 30%;
  height: 30%;
}
</style>